
CREATE TABLE [dbo].[Database](
	[DatabaseID] [int] IDENTITY(300000,1) NOT NULL,
	[ServerSQLID] [int] NOT NULL,
	[DatabaseName] [varchar](128) NOT NULL,
	[Collation] [varchar](128) NULL,
	[CompatibilityLevel] [char](12) NULL,
	[DBCreateDate] [smalldatetime] NULL,
	[RecoveryModel] [char](10) NULL,
	[CreateDate] [smalldatetime] NOT NULL,
	[UpdateDate] [smalldatetime] NOT NULL,
	[Active] [tinyint] NOT NULL,
 CONSTRAINT [PK_databaseID] PRIMARY KEY CLUSTERED 
(
	[DatabaseID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'The Database table contains information about MS SQL databases Data in this table is collected via PowerShell by executing Upsert-Database.ps1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Database'
GO

ALTER TABLE [dbo].[Database] ADD  CONSTRAINT [DF_Database_Active]  DEFAULT ((0)) FOR [Active]
GO


